import request from './request'

// 分页查询权限
export const getPermPage = (data) => {
  return request({
    url: '/perm/permInfo/page',
    method: 'post',
    data: data
  })
}

// 查询权限列表
export const getPermList = (params) => {
  return request({
    url: '/perm/permInfo/list',
    method: 'get',
    params: params
  })
}

// 添加权限
export const addPerm = (data) => {
  return request({
    url: '/perm/permInfo',
    method: 'post',
    data
  })
}

// 编辑权限
export const editPerm = (data) => {
  return request({
    url: `/perm/permInfo`,
    method: 'put',
    data
  })
}

// 删除权限
export const deletePerm = (id) => {
  return request({
    url: `/perm/permInfo/${id}`,
    method: 'delete'
  })
}